package com.kgd.news.controller.admin;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.upload.UploadFile;
import com.kgd.news.entity.FrequentlyQuestion;
import com.kgd.news.entity.HkCategory;
import com.kgd.news.entity.Order;
import com.kgd.news.entity.WithdrawCash;
import com.kgd.news.utils.BaseController;
import com.kgd.news.utils.StringUtilsWx;

/**
 * @Email: huangsanm@foxmail.com
 * @Date: 2017/9/26
 * @Time: 下午11:12queryForm
 */
public class WithdrawCashController extends BaseController {

    @Override
    public void list() {
        String userid = getPara("userid");
        String type = "withdrawcash";
        String sql = "from withdraw_cash where 1 = 1";
        if (!StringUtilsWx.isEmpty(userid)) {
            sql += " and userid like '%" + userid + "%'";
            type += userid;
        }
        sql += " order by id desc";
            Page<WithdrawCash> data = WithdrawCash.dao.paginate(getPageIndex(type), PAGE_SIZE, "select *", sql);
//        }
        setAttr("data", data);
        render("withdrawcash_list.html");
    }

    @Override
    public void edit() {

    }

    @Override
    public void save() {

    }

    @Override
    public void del() {

    }


}
